HipTextRenderer

This class oculd be refactored in the future to actually use a spritebatch for its drawing.

Constructors

this
this(HipOrthoCamera camera, index_t maxIndices)
Undocumented in source.

Members

Functions

addVertices
void addVertices(void[] vertices, IHipFont font)

This way it will reallocate once.

draw
void draw()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(string text, int x, int y, HipTextAlign alignh, HipTextAlign alignv, int boundsWidth, int boundsHeight, bool wordWrap)

Implementation for unchanging text. The text will be saved, represented as an internal ID to a managed static HipText. Which means the texture will be baked so it is possible to actually draw it a lot faster as all the preprocessings are done once.

flush
void flush()

Flush should be took care since it could make it rewrite to the same part of the buffer agin. While shadow buffering is not implemented, use it as that.

setColor
void setColor(HipColor color)
Undocumented in source. Be warned that the author may not have intended to support it.
setCurrentDepth
void setCurrentDepth(float depth)
Undocumented in source. Be warned that the author may not have intended to support it.
setFont
void setFont(IHipFont font)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

camera
HipOrthoCamera camera;
Undocumented in source.
color
HipColor color;
Undocumented in source.
font
IHipFont font;
Undocumented in source.
indices
index_t[] indices;
Undocumented in source.
managedDepth
float managedDepth;
Undocumented in source.
mesh
Mesh mesh;
Undocumented in source.
shouldRenderLineBreak
bool shouldRenderLineBreak;
shouldRenderSpace
bool shouldRenderSpace;
Undocumented in source.
vertices
HipTextRendererVertex[] vertices;
Undocumented in source.

Meta